home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 21
/
CU Amiga Magazine's Super CD-ROM 21 (1998)(EMAP Images)(GB)[!][issue 1998-04].iso
/
CUCD
/
Programming
/
PPCSmallTalk
/
docs
/
appendix3
< prev
next >
Wrap
Text File
|
1986-10-19
|
10KB
|
529 lines
_C_l_a_s_s _D_e_s_c_r_i_p_t_i_o_n
ellipsewid = 1.3i arrow A: ellipse "class heading" arc
-> cw arc ellipse "instance variables" arc -> arc cw B:
ellipse "protocol" arrow arrow from A.e to B.w
_C_l_a_s_s _H_e_a_d_i_n_g
arrow circle "CCCCllllaaaassssssss" arrow ellipse "variable" arrow
right 3i move left 3i move right 0.1i arc -> cw arc
ellipse "colon variable" arc -> arc cw
vvvvaaaarrrriiiiaaaabbbblllleeee defines the class name, must begin with an
upper case letter.
ccccoooolllloooonnnn vvvvaaaarrrriiiiaaaabbbblllleeee defines the superclass name, superclass
is OOOObbbbjjjjeeeecccctttt if not given.
_I_n_s_t_a_n_c_e _V_a_r_i_a_b_l_e_s
arrow circle "|" arrow A: ellipse "variable" arc -> cw
arc cw arrow left 1.3i arc cw arc cw move to A.e arrow
circle "|" arrow
Instance variables must begin with a lower case letter.
_P_r_o_t_o_c_o_l
arrow circle "[" arrow A: ellipse "method" arc -> cw
line down 0.2i arc cw arrow left 0.4i circle "|" arrow
left 0.4i arc cw line up 0.2i arc cw move to A.e arrow
circle "]" arrow
Vertical bar separating methods mmmmuuuusssstttt be placed in
column 1.
_M_e_t_h_o_d
arrow A: ellipse "method pattern" arc -> cw arc ellipse
"temporary variables" arc -> arc cw C: ellipse "state-
ments" arrow arrow from A.e to C.w
September 19, 1986
_M_e_t_h_o_d _P_a_t_t_e_r_n
A: arrow ellipse "unary selector" arrow right 3i move
to A arc -> cw line down 0.1i B: arc ellipse "binary
selector" arrow ellipse "argument variable" arc -> line
up 0.1i arc -> cw move to start of B line down 0.6i arc
ellipse "keyword selector" arrow C: ellipse "argument
variable" arc line up 0.6i move to C.e right arc -> cw
arc cw arrow left 3.1i arc -> cw arc cw
Argument variables must begin with a lower case letter,
and must be distinct from instance variables.
_T_e_m_p_o_r_a_r_y _V_a_r_i_a_b_l_e_s
arrow circle "|" arrow A: ellipse "variable" arc -> cw
arc cw arrow left 1.3i arc cw arc cw move to A.e arrow
circle "|" arrow
temporary variables must begin with lower case letters,
and must be distinct from both instance and argument
variables.
_S_t_a_t_e_m_e_n_t_s
arrow A: line right 1.5i move to start of A arc -> cw
arc circle "|^" arc -> arc cw B: ellipse "expression"
arrow right 2.5i move to B.e move right 0.5i arc -> cw
arc circle "." arc -> arc cw move to B.e arc -> cw line
down 0.4i arc -> cw circle "." arrow left 2.5i arc cw
arrow up 0.4i arc cw
_E_x_p_r_e_s_s_i_o_n
A: arrow right 3.3i move to start of A arc -> cw arc
ellipse "variable" arrow B: circle "<-" arc -> arc cw
C: ellipse "cascaded expression" arrow move to B.e arc
-> cw arc cw arrow left 2.3i arc -> cw arc cw
September 19, 1986
_C_a_s_c_a_d_e_d _E_x_p_r_e_s_s_i_o_n
arrow ellipse "simple expression" arrow right 3.5i move
left 0.5i right arc -> cw arc cw circle ";" arrow
ellipse "continuation" arc -> cw arc cw
_S_i_m_p_l_e _E_x_p_r_e_s_s_i_o_n
arrow A: ellipse "binary" arrow move to A.e arc -> cw
line down 0.2i arc cw ellipse "keyword" arc -> cw line
up 0.2i arc cw
_B_i_n_a_r_y
arrow A: ellipse "unary" arrow move to A.e arc -> cw B:
line down 0.2i arc cw ellipse "binary selector" arc ->
cw line up 0.2i arc cw
_U_n_a_r_y
arrow A: ellipse "primary" B: line right 2i arc -> cw
arc cw ellipse "unary selector" arc -> cw arc cw move
to B.e arrow right
_P_r_i_m_i_t_i_v_e
arrow right 0.2i circle "<primitive" wid 0.7i arrow
right 0.2i ellipse "unsigned integer" A: line right
1.7i arc -> cw arc cw ellipse "primary" arc -> cw arc
cw move to A.e arrow right circle ">" arrow right
Unsigned integer must be a number in the range 0-255.
September 19, 1986
_P_r_i_m_a_r_y
A: arrow right 2i ellipse "variable" arrow right 2i
move to start of A move right 0.5i arc -> cw B: line
down 0.1i arc arrow right 1i ellipse "literal" arrow
right 1i arc -> line up 0.1i arc cw move to end of B C:
arrow down 0.6i arc arrow right 1i ellipse "block"
arrow right 1i arc -> line up 0.6i move to end of C Z:
arrow down 0.6i arc arrow right 1i ellipse "primitive"
arrow right 1i arc -> line up 0.6i move to end of Z
arrow down 0.6i arc circle "(" arrow ellipse "cascaded
expression" arrow circle ")" arc -> line up 0.6i
If variable begins with an upper case letter it is a
class name, otherwise variable must be instance, argu-
ment or temporary variable or pseudo variable name.
_C_o_n_t_i_n_u_a_t_i_o_n
A: arrow arrow right 1.5i ellipse "unary selector" Z:
line right 1.5i arrow right 0.5i move to end of Z arc
-> cw arrow down 2i arc -> cw arrow left 4.5i arc -> cw
arrow up 2i arc -> cw move to end of A arc -> cw C:
arrow down 0.4i arc ellipse "binary selector" arrow
ellipse "unary" arc -> line up 0.4i arc cw move to end
of C arrow down 0.6i arc ellipse "keyword" arrow D:
ellipse "binary" arc -> line up 0.6i move to D.e right
arc -> cw arc cw arrow left 3.1i arc cw arc -> cw
September 19, 1986
_B_l_o_c_k
arrow A: circle "[" arrow right 2.2i ellipse "state-
ments" arrow circle "]" arrow move to A.e arc -> cw arc
ellipse "block arguments" width 1.2i arc -> arc cw
The last statement cannot be followed by a period.
_B_l_o_c_k _A_r_g_u_m_e_n_t_s
arrow A: ellipse "colon variable" arrow circle "|"
arrow move to A.e arc -> cw arc cw arrow left 1.3i arc
cw arc cw
_L_i_t_e_r_a_l
arrow right 1i A: arrow ellipse "number" arrow right
1.5i move to start of A arc -> cw B: line down 0.1i arc
ellipse "symbol" arc -> line up 0.1i arc cw move to end
of B C: arrow down 0.6i arc ellipse "string" arc ->
line up 0.6i move to end of C D: arrow down 0.6i arc
ellipse "character constant" arc -> line up 0.6i move
to end of D H: arrow down 0.6i arc ellipse "bytearray"
arc -> line up 0.6i move to end of H E: arrow down 0.6i
arc ellipse "array constant" arc -> line up 0.6i
September 19, 1986
_N_u_m_b_e_r
A: arrow right 3.6i move to start of A arc -> cw arc
ellipse "base" width 0.8i arc -> arc cw arc -> cw arc
ellipse "sign" width 0.8i arc -> arc cw ellipse
"unsigned number" arrow
_B_a_s_e
arrow ellipse "unsigned integer" arrow circle "r" arrow
_S_i_g_n
A: arrow arrow right 3i move to end of A B: arc cw arc
circle "+" arc arc cw move to end of B arrow down 0.6i
arc circle "-" arc arrow up 0.6i
_U_n_s_i_g_n_e_d _N_u_m_b_e_r
arrow A: ellipse "unsigned fraction" arc -> cw arc cir-
cle "e" arrow right 0.25i ellipse "sign" width 0.8i
arrow right 0.25i ellipse "unsigned integer" arc -> arc
cw move to A.e arrow right 4.2i
_U_n_s_i_g_n_e_d _F_r_a_c_t_i_o_n
arrow A: ellipse "unsigned integer" arc -> cw arc cir-
cle "." arrow ellipse "unsigned integer" arc -> arc cw
move to A.e arrow right 4i
_U_n_s_i_g_n_e_d _I_n_t_e_g_e_r
arrow A: circle "digit" arrow move to A.e arc -> cw arc
cw arrow left 0.5i arc -> cw arc cw
September 19, 1986
_S_y_m_b_o_l
arrow circle "#" arrow A: circle "char" arrow move to
A.e arc cw arc cw arrow left 0.5i arc cw arc cw
char is any non-space character that is not one of
period, parenthesis or square braces.
_S_t_r_i_n_g
arrow circle "'" arrow A: circle "char" arrow circle
"'" arrow move to A.e arc cw arc cw arrow left 0.5i arc
cw arc cw
To include a quote mark in a string, use two adjacent
quote marks.
_C_h_a_r_a_c_t_e_r _C_o_n_s_t_a_n_t
arrow circle "$" arrow circle "char" arrow
_B_y_t_e_a_r_r_a_y
arrow circle "#" arrow circle "[" arrow A: ellipse
"unsigned integer" arrow circle "]" arrow move to A.e
arc -> cw arc cw line left 1.3i arc -> cw arc cw
Integer must be in the range 0 through 255.
_A_r_r_a_y _C_o_n_s_t_a_n_t
arrow circle "#" arrow ellipse "array" arrow
September 19, 1986
_A_r_r_a_y
arrow circle "(" arrow A: arc -> cw arc ellipse
"number" arc -> arc cw B: arrow circle ")" arrow move
to start of A arrow right 2.5i move to end of A C:
arrow down 0.6i arc ellipse "symbol" arc -> arrow up
0.6i move to end of C D: arrow down 0.6i arc ellipse
"string" arc -> arrow up 0.6i move to end of D E: arrow
down 0.6i arc ellipse "character constant" arc -> arrow
up 0.6i move to end of E arrow down 0.6i arc ellipse
"array" arc -> arrow up 0.6i move to start of B right
arc -> cw arrow down 3i arc -> cw arrow left 2.4i arc
-> cw arrow up 3i arc -> cw
The leading sharp sign can be omitted in symbols and
arrays inside of an array list. Binary selectors, key-
words, and other strings are treated as Symbols inside
of arrays.
September 19, 1986